1. Field of the Invention
The present invention relates to a method, system, and article of manufacture for monitoring patterns of processes accessing addresses in a storage device to determine access parameters to apply.
2. Description of the Related Art
Application processes may concurrently access memory addresses in a shared memory. A process may comprise one or more threads allocated processor and computer resources to execute computer instructions. Multiple processes or multiple threads in one process may concurrently execute instructions for one application, or multiple processes may concurrently execute instructions for multiple applications. Multiple processes may execute on multiple processors. The term “process” as used herein refers to a process, thread or any other unit of execution allocated to execute instructions. To access the memory addresses, the processes must obtain a spinlock for each address. If the spinlock is not available or granted to another process, then the process must repeatedly check until the spinlock becomes available. Application processes may experience an execution error based on a non-deterministic pattern of accesses. For instance, a certain non-deterministic access pattern of requests for memory addresses may result in a deadlock or other locking errors due to a race condition. A race condition occurs when separate processes or threads of execution depend on some shared state. A deadlock refers to a specific condition when two or more processes, such as in a multi-processor environment, are each waiting for the process to release a shared resource, such as a lock for a resource, or more than two processes are waiting for resources in a circular chain.
Troubleshooting of errors resulting from non-deterministic access patterns of the shared resource may be difficult to predict or replicate because many access patterns for the same set of processes may not produce an error. Thus, even if the developer is alerted of the problem, the developer may not be able to reproduce the access pattern or conditions that lead to the error. Further, during product development, the developer may not be able to take into account all access patterns that may occur when testing concurrent processes on multiple processors, and may not experience the error because the problem access pattern was not realized during testing conditions.
There is a need in the art for improved techniques for avoiding errors resulting from non-deterministic access patterns of computer resources, such as memory addresses in a shared memory.